package com.mingqijia.gassafety.db.entity.auth;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 权限系统的权限数据项
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年11月01日 10:57
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "t_gss_privilege", schema = "mingqijia_gas_common_db")
public final class PrivilegeEntry extends BaseEntry {

    /** 权限主体ID */
    @TableField("subject_id")
    private String subjectId;

    /** 权限主体类型 */
    @TableField("subject_type")
    private Integer subjectType;

    /** 权限对象类型 */
    @TableField("priv_type")
    private Integer privilegeType;

    /** 权限状态 */
    @TableField private Integer state;

    /** 资源编码 */
    @TableField private String data;

    /** 资源操作 */
    @TableField("sp_id")
    private String spId;
}
